package cn.edu.cumt.ec.shop.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;


/**
*
* @author gy
* @since 2021-08-31
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="ProductAddDto", description="商品新增参数")
public class ProductAddDto implements Serializable {

    @ApiModelProperty(value = "商品类别")
    @NotNull(message = "商品类别不能为空")
    private Long categoryId;

    @ApiModelProperty(value = "商品名称")
    @NotEmpty(message = "商品名称不能为空")
    private String productName;

    @ApiModelProperty(value = "商品图片")
    private String imgUrls;

    @ApiModelProperty(value = "商品简介")
    @NotEmpty(message = "商品简介不能为空")
    private String introduction;

    @ApiModelProperty(value = "积分")
    @NotNull(message = "积分不能为空")
    private Integer price;

    @ApiModelProperty(value = "库存")
    @NotNull(message = "库存不能为空")
    private Integer stock;

    @ApiModelProperty(value = "上架状态(0:下架,1：上架)")
    @NotNull(message = "上架状态不能为空")
    private Integer onShelf;

}
